var txtDefaultTextSearch = 'Tìm là thấy!';
var infobutton = new Array();
infobutton['web']= 'Tìm Nhanh';
infobutton['video']= 'Tìm Nhanh';
infobutton['sanhdieu']= 'Tìm Nhanh';
infobutton['bando']= 'Tìm Nhanh';
infobutton['forum']= 'Tìm Nhanh';
infobutton['amnhac']= 'Tìm Nhanh';
infobutton['cafe']= 'Tìm Nhanh';
infobutton['game']= 'Tìm Nhanh';
infobutton['thoitrang']= 'Tìm Nhanh';
infobutton['namgioi']= 'Tìm Nhanh';
infobutton['nhipsong']= 'Tìm Nhanh';
infobutton['phim']= 'Tìm Nhanh';
infobutton['photo']= 'Tìm Nhanh';
infobutton['thethao']= 'Tìm Nhanh';
infobutton['thugian']= 'Tìm Nhanh';
infobutton['tintuc']= 'Tìm Nhanh';
infobutton['vieclam']= 'Tìm Nhanh';
infobutton['dtdd']= 'Tìm Nhanh';
infobutton['nhadat']= 'Tìm Nhanh';
infobutton['xe']= 'Tìm Nhanh';
infobutton['raovat']= 'Tìm Nhanh';
var urlbutton = new Array();
urlbutton['web']= 'http://web.timnhanh.com/index.php?timnhanh=';
urlbutton['video']= 'http://video.timnhanh.com/index.php?timnhanh=';
urlbutton['sanhdieu']= 'http://sanhdieu.timnhanh.com/news/index.php?timnhanh=';
urlbutton['bando']= 'http://bando.timnhanh.com/image/index.php?timnhanh=';
urlbutton['forum']= 'http://forum.timnhanh.com/video/index.php?timnhanh=';
urlbutton['amnhac']= 'http://amnhac.timnhanh.com/audio/index.php?timnhanh=';
urlbutton['cafe']= 'http://cafe.timnhanh.com/index.php?timnhanh=';
urlbutton['game']= 'http://game.timnhanh.com/news/index.php?timnhanh=';
urlbutton['thoitrang']= 'http://thoitrang.timnhanh.com/image/index.php?timnhanh=';
urlbutton['namgioi']= 'http://namgioi.timnhanh.com/video/index.php?timnhanh=';
urlbutton['nhipsong']= 'http://nhipsong.timnhanh.com/audio/index.php?timnhanh=';
urlbutton['phim']= 'http://phim.timnhanh.com/index.php?timnhanh=';
urlbutton['photo']= 'http://photo.timnhanh.com/news/index.php?timnhanh=';
urlbutton['thethao']= 'http://thethao.timnhanh.com/image/index.php?timnhanh=';
urlbutton['thugian']= 'http://thugian.timnhanh.com/video/index.php?timnhanh=';
urlbutton['tintuc']= 'http://tintuc.timnhanh.com/audio/index.php?timnhanh=';
urlbutton['vieclam']= 'http://vieclam.timnhanh.com/index.php?timnhanh=';
urlbutton['dtdd']= 'http://dtdd.timnhanh.com/news/index.php?timnhanh=';
urlbutton['nhadat']= 'http://nhadat.timnhanh.com/image/index.php?timnhanh=';
urlbutton['xe']= 'http://xe.timnhanh.com/video/index.php?timnhanh=';
urlbutton['raovat']= 'http://raovat.timnhanh.com/audio/index.php?timnhanh=';
function changinfo(info){
var frm=document.form1;
frm.temp.value=info;
document.getElementById("Check1").value=infobutton[info];
if(info=="web") document.getElementById(info).className='select_tab1';
else document.getElementById('web').className='';
if(info=="video") document.getElementById(info).className='select_tab';		
else document.getElementById('video').className='';
if(info=="sanhdieu") document.getElementById(info).className='select_tab';
else document.getElementById('sanhdieu').className='';
if(info=="bando") document.getElementById(info).className='select_tab';
else document.getElementById('bando').className='';
if(info=="forum") document.getElementById(info).className='select_tab';
else document.getElementById('forum').className='';
if(info=="amnhac") document.getElementById(info).className='select_tab';
else document.getElementById('amnhac').className='';
if(info=="cafe") document.getElementById(info).className='select_tab';
else document.getElementById('cafe').className='';
if(info=="game") document.getElementById(info).className='select_tab';
else document.getElementById('game').className='';
if(info=="thoitrang") document.getElementById(info).className='select_tab';
else document.getElementById('thoitrang').className='';
if(info=="namgioi") document.getElementById(info).className='select_tab';
else document.getElementById('namgioi').className='';
if(info=="nhipsong") document.getElementById(info).className='select_tab';
else document.getElementById('nhipsong').className='';	
if(info=="phim") document.getElementById(info).className='select_tab';
else document.getElementById('phim').className='';
if(info=="photo") document.getElementById(info).className='select_tab';
else document.getElementById('photo').className='';
if(info=="thethao") document.getElementById(info).className='select_tab';
else document.getElementById('thethao').className='';
if(info=="thugian") document.getElementById(info).className='select_tab';
else document.getElementById('thugian').className='';
if(info=="tintuc") document.getElementById(info).className='select_tab';
else document.getElementById('tintuc').className='';
if(info=="vieclam") document.getElementById(info).className='select_tab';
else document.getElementById('vieclam').className='';
if(info=="dtdd") document.getElementById(info).className='select_tab';
else document.getElementById('dtdd').className='';
if(info=="nhadat") document.getElementById(info).className='select_tab';
else document.getElementById('nhadat').className='';
if(info=="xe") document.getElementById(info).className='select_tab';
else document.getElementById('xe').className='';
if(info=="raovat") document.getElementById(info).className='select_tab';
else document.getElementById('raovat').className='';
if(info =="vieclam"){
document.getElementById('form1').style.display='none';
document.getElementById('form3').style.display='none';
document.getElementById('formvl').style.display='';}
else {
document.getElementById('form1').style.display='';
document.getElementById('form3').style.display='none';
document.getElementById('formvl').style.display='none';}
if(info!=item_default)
getPositionShow(info);	
if(document.getElementById("txtSearch").value != txtDefaultTextSearch)
document.getElementById("txtSearch").focus();}
function changinfovl(info){
var frm=document.form1;
frm.temp.value=info;
document.getElementById("Check1").value=infobutton[info];
if(info=="web") document.getElementById(info).className='select_tab1';
else document.getElementById('web').className='';
if(info=="video") document.getElementById(info).className='select_tab';		
else document.getElementById('video').className='';
if(info=="sanhdieu") document.getElementById(info).className='select_tab';
else document.getElementById('sanhdieu').className='';
if(info=="bando") document.getElementById(info).className='select_tab';
else document.getElementById('bando').className='';
if(info=="forum") document.getElementById(info).className='select_tab';
else document.getElementById('forum').className='';
if(info=="amnhac") document.getElementById(info).className='select_tab';
else document.getElementById('amnhac').className='';
if(info=="cafe") document.getElementById(info).className='select_tab';
else document.getElementById('cafe').className='';
if(info=="game") document.getElementById(info).className='select_tab';
else document.getElementById('game').className='';
if(info=="thoitrang") document.getElementById(info).className='select_tab';
else document.getElementById('thoitrang').className='';
if(info=="namgioi") document.getElementById(info).className='select_tab';
else document.getElementById('namgioi').className='';
if(info=="nhipsong") document.getElementById(info).className='select_tab';
else document.getElementById('nhipsong').className='';	
if(info=="phim") document.getElementById(info).className='select_tab';
else document.getElementById('phim').className='';
if(info=="photo") document.getElementById(info).className='select_tab';
else document.getElementById('photo').className='';
if(info=="thethao") document.getElementById(info).className='select_tab';
else document.getElementById('thethao').className='';
if(info=="thugian") document.getElementById(info).className='select_tab';
else document.getElementById('thugian').className='';
if(info=="tintuc") document.getElementById(info).className='select_tab';
else document.getElementById('tintuc').className='';
if(info=="vieclam") document.getElementById(info).className='select_tab';
else document.getElementById('vieclam').className='';
if(info=="dtdd") document.getElementById(info).className='select_tab';
else document.getElementById('dtdd').className='';
if(info=="nhadat") document.getElementById(info).className='select_tab';
else document.getElementById('nhadat').className='';
if(info=="xe") document.getElementById(info).className='select_tab';
else document.getElementById('xe').className='';
if(info=="raovat") document.getElementById(info).className='select_tab';
else document.getElementById('raovat').className='';
if(info =="vieclam"){
document.getElementById('form1').style.display='none';
document.getElementById('form3').style.display='none';
document.getElementById('formvl').style.display='';}
else{
document.getElementById('form1').style.display='';
document.getElementById('form3').style.display='none';
document.getElementById('formvl').style.display='none';}
if(info!=item_default)
getPositionShow(info);}
function timlathay(){
if(document.form1.text.value != txtDefaultTextSearch){
document.form1.text.style.fontWeight='normal';	
document.form1.text.style.color='#000';}
if(document.form4.text.value != txtDefaultTextSearch){
document.form4.text.style.fontWeight='normal';	
document.form4.text.style.color='#000';}}
function funcReturnValue(strInputId, strInputDefaultValue, strColorChange, strInputFont){
var strCurrentValue = document.getElementById(strInputId).value;
if(strCurrentValue==strInputDefaultValue){
document.getElementById(strInputId).value='';
document.getElementById(strInputId).style.color = strColorChange;
document.getElementById(strInputId).style.fontWeight = strInputFont;}
else if(strCurrentValue==''){
document.getElementById(strInputId).value = strInputDefaultValue;
document.getElementById(strInputId).style.color = '';
document.getElementById(strInputId).style.fontWeight = strInputFont;}
return true;}
function focusText(){
var d=document;
if(d.getElementById){
var el=d.getElementById("txtSearch");
if(el && el.value!=str_slogan && el.createTextRange){
var rng=el.createTextRange(),pos=el.value.length;
if(pos!=-1 && rng){
	rng.moveStart("character",pos+1);
	rng.collapse();
	rng.select();}}}}
